#!/bin/bash
set -e

read -p "Enter Version [major,minor,patch or version number]:" verb
verb=${verb:-"patch"}
npm version $verb
cver=`git describe --always --tag`
cver=${cver:1}
./build.sh
curl -v -F r=releases \
        -F hasPom=false \
        -F g=com.blueocn.das \
        -F a=das-ui \
        -F v=${cver} \
        -F p=zip \
        -F file="@dist/lastest.zip" \
        -u admin:oneAPM123 \
        http://10.128.7.197:8081/nexus/service/local/artifact/maven/content
